<?php


namespace Addons\School\Requests;


use Addons\School\Models\School;
use App\Http\Requests\MyRequest;

class SchoolRequest extends MyRequest
{
    public function authorize(): bool
    {
        return true;
    }

    public function rules(): array
    {
        return [
            'name' => ['required', 'max:255'],
            'icon' => ['required'],
            'description' => ['max:255'],
        ];
    }

    public function messages(): array
    {
        return [
            'name.required' => '请输入学校名称',
            'name.max' => '学校名称长度错误',
            'description.max' => '描述长度错误',
            'icon.required' => '请上传学校图标',
      
        ];
    }
}
